import React from 'react';
import { useContext } from 'react';
import head from '../image/head.jpeg'
import unknow from '../image/unknow.jpeg'
import './LeftHead.css'
import commonContext from '../context';

export default function LeftHead(props) {

  const commonCtx = useContext(commonContext);

  return (
    <div className="wrap-head">
      <img src={unknow} alt="" />
      {
        commonCtx.user===''
            ? <h1>游客访问</h1>
            : <h1>{commonCtx.user}</h1>
      }      
      <p>欢迎访问jason论坛</p>
      <div className="btn_logIn"><a href="#/login">登陆</a></div>
      <div className="btn_signUp"><a href="#/signup">注册</a></div>
    </div>
  )
}
